//
//  E7AnimationRoot.h
//  EndlessBattle
//
//  Created by cc on 12-4-23.
//  Copyright (c) 2012年 PalmGame. All rights reserved.
//

#ifndef EndlessBattle_CE7AnimationRoot_h
#define EndlessBattle_CE7AnimationRoot_h

#include "E7AnimationDefine.h"

#include "E7FrameInfo.h"

class  CE7AnimationRoot : public CCNode
{
protected:
    CE7AnimationRoot() ;
    virtual ~CE7AnimationRoot() ;

    void step(ccTime dt) ;

public:
//    virtual void Init(const char* filename) = 0 ;
    void Start() ;
    void Stop() ;
//    virtual void Pause() = 0 ;
//    virtual void Resume() = 0 ;
//    virtual void NextStep() = 0 ;

public:
    void SetID(eAnimationIDs eID) { m_eID = eID ; }
    void SetLoop(bool flag)       { m_bIsLoop = flag ; }
    void SetFrameMax(int max)     { m_nFrameMax = max ; }

public:
    bool IsPlaying() { return m_bIsPlaying ; }

protected:
    eAnimationIDs         m_eID ;
    bool                  m_bIsLoop ;
    int                   m_nFrameMax ;
    CE7FrameInfo*         m_pFrames ;
    float                 m_fInterval ;
    CCSpriteBatchNode*    m_pSheet ;
    CCNode*               m_pRoot ;

private:
    char*                 m_strFile ;
    bool                  m_bIsPlaying ;
    int                   m_nFrameIndex ;
} ;

#endif













